package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.IssueSalaryCalculateRuleDTO;
import org.jsola.hr.dto.SalaryCalculateRuleGroupAddDTO;
import org.jsola.hr.dto.SalaryCalculateRuleGroupUpdateDTO;
import org.jsola.hr.query.SalaryCalculateRuleEmpInfoQuery;
import org.jsola.hr.query.SalaryCalculateRuleGroupQuery;
import org.jsola.hr.vo.EmpInfoVO;
import org.jsola.hr.vo.SalaryCalculateRuleGroupListVO;
import org.jsola.hr.vo.SalaryCalculateRuleGroupVO;

import java.util.List;

/**
 * 工价计算规则组
 *
 * @author zhr
 */
@Api(tags = "hr-工价计算规则组")
public interface ISalaryCalculateRuleGroupControllerAPI {

    /**
     * 新增工价计算规则组
     * @param salaryCalculateRuleGroupAddDTO 工价计算规则组新增实体
     * @return 工价计算规则组展示对象
     */
    @ApiOperation(value = "新增工价计算规则组")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryCalculateRuleGroupAddDTO", dataType = "SalaryCalculateRuleGroupAddDTO", value = "新增工价计算规则组", paramType = "body")
    })
    Result<SalaryCalculateRuleGroupVO> save(SalaryCalculateRuleGroupAddDTO salaryCalculateRuleGroupAddDTO);

    /**
     * 下发规则
     * @param issueSalaryCalculateRuleDTO 下发规则
     * @return 下发的数量
     */
    @ApiOperation(value = "下发规则")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "issueSalaryCalculateRuleDTO", dataType = "IssueSalaryCalculateRuleDTO", value = "下发规则", paramType = "body")
    })
    Result<Integer> issueGroup(IssueSalaryCalculateRuleDTO issueSalaryCalculateRuleDTO);



    /**
     * 修改工价计算规则组
     * @param salaryCalculateRuleGroupUpdateDTO 工价计算规则组
     * @return 更新数量
     */
    @ApiOperation(value = "修改工价计算规则组")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryCalculateRuleGroupUpdateDTO", dataType = "SalaryCalculateRuleGroupUpdateDTO", value = "修改工价计算规则组", paramType = "body")
    })
    Result<Integer> update(SalaryCalculateRuleGroupUpdateDTO salaryCalculateRuleGroupUpdateDTO);




    /**
     * 删除单个工价计算规则组，彻底删除
     * @param salaryCalculateRuleGroupId 工价计算规则组id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个工价计算规则组，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryCalculateRuleGroupId", dataType = "String", value = "工价计算规则组id", paramType = "path")
    })
    Result<Integer> delete(String salaryCalculateRuleGroupId);


    /**
     * 批量删除工价计算规则组，彻底删除
     * @param salaryCalculateRuleGroupIds 工价计算规则组id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除工价计算规则组，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryCalculateRuleGroupIds", dataType = "String[]", value = "工价计算规则组id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] salaryCalculateRuleGroupIds);


    /**
     * 根据工价计算规则组id查询工价计算规则组详情
     * @param salaryCalculateRuleGroupId 工价计算规则组id
     * @return 工价计算规则组详情
     */
    @ApiOperation(value="根据工价计算规则组id查询工价计算规则组详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryCalculateRuleGroupId", dataType = "String", value = "工价计算规则组id", paramType = "path")
    })
    Result<SalaryCalculateRuleGroupVO> findById(String salaryCalculateRuleGroupId);


    /**
     * 查询工价计算规则组
     * @param salaryCalculateRuleGroupQuery 工价计算规则组查询参数
     * @return page
     */
    @ApiOperation(value="查询工价计算规则组")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryCalculateRuleGroupQuery", dataType = "SalaryCalculateRuleGroupQuery", value = "工价计算规则组查询参数", paramType = "query")
    })
    Result<List<SalaryCalculateRuleGroupListVO>> listAll(SalaryCalculateRuleGroupQuery salaryCalculateRuleGroupQuery);


     /**
     * 分页查询工价计算规则组
     * @param salaryCalculateRuleGroupQuery 工价计算规则组查询参数
     * @return page
     */
    @ApiOperation(value="分页查询工价计算规则组")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryCalculateRuleGroupQuery", dataType = "SalaryCalculateRuleGroupQuery", value = "工价计算规则组查询参数", paramType = "query")
    })
    Result<Page<SalaryCalculateRuleGroupListVO>> page(SalaryCalculateRuleGroupQuery salaryCalculateRuleGroupQuery);

    /**
     * 根据规则组id查询使用的员工信息
     * @param salaryCalculateRuleEmpInfoQuery 工价规则使用人员查询
     * @return 员工列表
     */
    @ApiOperation(value="根据规则组id查询使用的员工信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryCalculateRuleEmpInfoQuery", dataType = "SalaryCalculateRuleEmpInfoQuery", value = "工价规则使用人员查询", paramType = "query")
    })
    Result<Page<EmpInfoVO>> selectEmpInfoVoCompanyUse(SalaryCalculateRuleEmpInfoQuery salaryCalculateRuleEmpInfoQuery);

    /**
     * 根据规则组id查询使用的员工信息(租户级别使用)
     * @param salaryCalculateRuleEmpInfoQuery 工价规则使用人员查询
     * @return 员工列表
     */
    @ApiOperation(value="根据规则组id查询使用的员工信息(租户级别使用)")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryCalculateRuleEmpInfoQuery", dataType = "SalaryCalculateRuleEmpInfoQuery", value = "工价规则使用人员查询", paramType = "query")
    })
    Result<Page<EmpInfoVO>> selectEmpInfoVoSiteUse(SalaryCalculateRuleEmpInfoQuery salaryCalculateRuleEmpInfoQuery);




}

